aboutsummaryrefslogtreecommitdiff
path: root/src/routes/player/[player]/index.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/player/[player]/index.svelte')
-rw-r--r--src/routes/player/[player]/index.svelte4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/player/[player]/index.svelte b/src/routes/player/[player]/index.svelte
index a04086d..b95ef8a 100644
--- a/src/routes/player/[player]/index.svelte
+++ b/src/routes/player/[player]/index.svelte
@@ -1,11 +1,11 @@
<script lang="ts" context="module">
import type { Load } from '@sveltejs/kit'
- import { API_URL } from '$lib/api'
+ import { fetchApi } from '$lib/api'
export const load: Load = async ({ params, fetch }) => {
const player: string = params.player
- const data = await fetch(`${API_URL}player/${player}?customization=true`).then(r => r.json())
+ const data = await fetchApi(`player/${player}?customization=true`, fetch).then(r => r.json())
if (!data.player) {
return {